<template>
    <view class="containner">
		<view class="headerbg"></view>
		<view class="select-box">
			<view class="student" @click="goPage('/pagesA/mockExam/index?currentTag=' + currentTag,1)"></view>
			<!-- <view class="teacher" @click="goPage('/pagesA/topicPractice/index?type=8',isTeacher)"></view> -->
			<view class="teacher" @click="goPage('/pagesA/mockExamJian/index?currentTag=' + currentTag,isTeacher)"></view>
		</view>
		
		<view style="padding:20rpx;">
			<view class="kon-img">
				<image src="/static/index/组 6.png" mode="aspectFill" class="imgs"></image>
				<view class="name" style="transform:translateX(-60rpx);">
					抖音直播是风口
				</view>
				<view class="name" style="transform:translateX(60rpx);">
					知识付费是潮流
				</view>
			</view>
		</view>
        <!-- <u-button :ripple="true" :custom-style="customStyle" @click="goPage('/pagesA/mockExam/index',1)">学员题库</u-button>
		<u-button :ripple="true" :custom-style="customStyle" @click="goPage('/pagesA/topicPractice/index?type=8',isTeacher)">讲师题库</u-button>
		<view class="tips">讲学交安课、驾考轻松过</view> -->
    </view>
</template>
<script>
import { toast } from '@/utils/common'
export default {
    data() {
        return {
   //          customStyle:{
			// 	backgroundColor:'#2AC092',
			// 	width:'400rpx',
			// 	height:'100rpx',
			// 	lineHeight:'100rpx',
			// 	color:'#fff',
			// 	margin:'0 auto',
			// 	fontSize:'32upx'
			// },
			isTeacher:0,
			currentTag: 1
        }
    },
    mounted() {
        let ui = uni.getStorageSync('userInfo')
		this.isTeacher = ui.is_teacher
    },
	onLoad(op) {
		this.currentTag = op.currentTag
	},
    methods: {
        goPage(url,num){
			console.log(num);
			if(num == 1){
				uni.navigateTo({
					url
				})
			}else{
				toast('你还不是讲师哦！')
			}
		}
    },
}
</script>
<style lang="scss" scoped>
	.kon-img{
		width:100%;
		height:300upx;
		position:relative;
		box-sizing:border-box;
		display:flex;
		flex-direction:column;
		justify-content: center;
		align-items: center;
		border-radius:20upx;
		overflow: hidden;
		.imgs{
			width:100%;
			height:100%;
			position:absolute;
			top:0;
			left:0;
		}
		.name{
			text-align:center;
			position:relative;
			z-index:2;
			padding:20upx;
			font-size:50upx;
			color:transparent;
			flex:none;
			background: linear-gradient(90deg,#333,#984616);
			background-clip: text;
			-webkit-background-clip: text;
		}
	}
	.containner{
		height: 100vh;
		background-color: #f5f5f5;
		// padding: 50upx;
		// display: flex;
		// flex-direction: column;
		// justify-content: space-around;
		// align-items: center;
	}
	.headerbg{
		height: 400upx;
		background-image: url('https://gzjakj.cn/uploads/images/bDI6qVXDe1kzYU1ILd5DF30YEiMyJclm5l8AzdFN.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}
	.select-box{
		height: 240upx;
		width: 100%;
		padding: 20upx;
		display: flex;
		justify-content: space-between;
		margin-bottom:120rpx;
	}
	.teacher,.student{
		flex: 1;
		height: 240upx;
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}
	// 
	.student{
		background-image: url('https://gzjakj.cn/uploads/images/Gsy8O4b9K2XjjQPpcUVcmwHsNwUHIg60WXWNFazO.png');
	}
	.teacher{
		margin-left: 20upx;
		background-image: url('https://gzjakj.cn/uploads/images/I8SRUlUf2nAbeL2jSgmjtsl1RZERFWqjy57tXhAj.png');
	}
	// .tips{
	// 	color: #999;
	// }
</style>
